/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.util;

import com.model.bean.NotificationTypeFacadeLocal;
import java.util.Date;
import javax.ejb.EJB;
import javax.ejb.Schedule;
import javax.ejb.Stateless;

/**
 *
 * @author Chung
 */
@Stateless
public class CheckNotification {

    @EJB
    private NotificationTypeFacadeLocal notificationTypeFacadeLocal;

    @Schedule(dayOfWeek = "*",
            month = "*",
            hour = "15",
            dayOfMonth = "*",
            year = "*",
            minute = "7",
            second = "1",
            persistent = false)

    public void myTimer() {
          
          notificationTypeFacadeLocal.checkNotification();
          System.out.println("===============Check Notifications:  ===============");
    }

}
